<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>JSON Voorhees: jsonv/tokenizer.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://www.mathjax.org/mathjax/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">JSON Voorhees
   </div>
   <div id="projectbrief">Killer JSON for C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('tokenizer_8hpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tokenizer.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A stream-based tokenizer meant to help with creating custom parsers.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="config_8hpp_source.html">jsonv/config.hpp</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="string__view_8hpp_source.html">jsonv/string_view.hpp</a>&gt;</code><br/>
<code>#include &lt;iosfwd&gt;</code><br/>
<code>#include &lt;memory&gt;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
</div>
<p><a href="tokenizer_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1tokenizer.html">jsonv::tokenizer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits input into tokens, allowing traversal of JSON without verification.  <a href="classjsonv_1_1tokenizer.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsonv_1_1tokenizer_1_1token.html">jsonv::tokenizer::token</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A representation of what this tokenizer has.  <a href="structjsonv_1_1tokenizer_1_1token.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:aaf2452ae899d841447d2cd35ab8f16d5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>token_kind</b> : unsigned int { <br/>
&#160;&#160;<b>jsonv::token_kind::unknown</b> = 0x00000, 
<b>jsonv::token_kind::array_begin</b> = 0x00001, 
<b>jsonv::token_kind::array_end</b> = 0x00002, 
<b>jsonv::token_kind::boolean</b> = 0x00004, 
<br/>
&#160;&#160;<b>jsonv::token_kind::null</b> = 0x00008, 
<b>jsonv::token_kind::number</b> = 0x00010, 
<b>jsonv::token_kind::separator</b> = 0x00020, 
<b>jsonv::token_kind::string</b> = 0x00040, 
<br/>
&#160;&#160;<b>jsonv::token_kind::object_begin</b> = 0x00080, 
<b>jsonv::token_kind::object_key_delimiter</b> = 0x00100, 
<b>jsonv::token_kind::object_end</b> = 0x00200, 
<b>jsonv::token_kind::whitespace</b> = 0x00400, 
<br/>
&#160;&#160;<b>jsonv::token_kind::comment</b> = 0x00800, 
<b>jsonv::token_kind::parse_error_indicator</b> = 0x10000
<br/>
 }</td></tr>
<tr class="memdesc:aaf2452ae899d841447d2cd35ab8f16d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The kind of token that was encountered in a <code>tokenizer</code>.  <a href="namespacejsonv.html#aaf2452ae899d841447d2cd35ab8f16d5">More...</a><br/></td></tr>
<tr class="separator:aaf2452ae899d841447d2cd35ab8f16d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9c56d3f5c67198d700b20c07912e1651"><td class="memItemLeft" align="right" valign="top">constexpr token_kind&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::operator|</b> (token_kind a, token_kind b)</td></tr>
<tr class="memdesc:a9c56d3f5c67198d700b20c07912e1651"><td class="mdescLeft">&#160;</td><td class="mdescRight">Combine multiple flag values.  <a href="#a9c56d3f5c67198d700b20c07912e1651">More...</a><br/></td></tr>
<tr class="separator:a9c56d3f5c67198d700b20c07912e1651"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac49dfe52c0e2e884c5442dc92938a08e"><td class="memItemLeft" align="right" valign="top">constexpr token_kind&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::operator&amp;</b> (token_kind a, token_kind b)</td></tr>
<tr class="memdesc:ac49dfe52c0e2e884c5442dc92938a08e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter out flag values.  <a href="#ac49dfe52c0e2e884c5442dc92938a08e">More...</a><br/></td></tr>
<tr class="separator:ac49dfe52c0e2e884c5442dc92938a08e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1fbf2e30116b5a8c417aa503353af85"><td class="memItemLeft" align="right" valign="top">constexpr token_kind&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::operator~</b> (token_kind a)</td></tr>
<tr class="memdesc:ac1fbf2e30116b5a8c417aa503353af85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invert flag values.  <a href="#ac1fbf2e30116b5a8c417aa503353af85">More...</a><br/></td></tr>
<tr class="separator:ac1fbf2e30116b5a8c417aa503353af85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45e5ce15d5decbc43536420cf48e2686"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::operator&lt;&lt;</b> (std::ostream &amp;, const token_kind &amp;)</td></tr>
<tr class="memdesc:a45e5ce15d5decbc43536420cf48e2686"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output the given <code>token_kind</code> to the <code>std::ostream</code>.  <a href="#a45e5ce15d5decbc43536420cf48e2686">More...</a><br/></td></tr>
<tr class="separator:a45e5ce15d5decbc43536420cf48e2686"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ff1650902b341b40ba6d45f1d3d7065"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> std::string&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::to_string</b> (const token_kind &amp;)</td></tr>
<tr class="memdesc:a7ff1650902b341b40ba6d45f1d3d7065"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert the given <code>token_kind</code> to an <code>std::string</code>.  <a href="#a7ff1650902b341b40ba6d45f1d3d7065">More...</a><br/></td></tr>
<tr class="separator:a7ff1650902b341b40ba6d45f1d3d7065"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A stream-based tokenizer meant to help with creating custom parsers. </p>
<p>If you are happy with the JSON Voorhees AST (<code>value</code> and friends), it is probably easier to use the functions in <code><a class="el" href="parse_8hpp.html" title="Copyright (c) 2012-2014 by Travis Gockel. ">jsonv/parse.hpp</a></code>.</p>
<p>Copyright (c) 2014-2018 by Travis Gockel. All rights reserved.</p>
<p>This program is free software: you can redistribute it and/or modify it under the terms of the Apache License as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later version.</p>
<dl class="section author"><dt>Author</dt><dd>Travis Gockel (<a href="#" onclick="location.href='mai'+'lto:'+'tra'+'vi'+'s@g'+'oc'+'kel'+'hu'+'t.c'+'om'; return false;">travi<span style="display: none;">.nosp@m.</span>s@go<span style="display: none;">.nosp@m.</span>ckelh<span style="display: none;">.nosp@m.</span>ut.c<span style="display: none;">.nosp@m.</span>om</a>) </dd></dl>

<p>Definition in file <a class="el" href="tokenizer_8hpp_source.html">tokenizer.hpp</a>.</p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_10cd029e0034a3f98d221f50ebb6d9d4.html">jsonv</a></li><li class="navelem"><a class="el" href="tokenizer_8hpp.html">tokenizer.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
